<?php

namespace app\admin\model\photo;

use think\Model;


class Related extends Model
{

    

    

    // 表名
    protected $name = 'photo_related';
    
    // 自动写入时间戳字段
    // protected $autoWriteTimestamp = 'integer';

    // // 定义时间戳字段名
    // protected $createTime = 'createtime';
    // protected $updateTime = 'updatetime';
    // protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    
     public function user()
    {
         
         return $this->hasOne(\app\admin\model\User::class, 'id', 'user_id');
         
    }
     public function city()
    {
         
         return $this->hasOne('City', 'id', 'city_id');
         
    }
     public function file()
    {
         
         return $this->hasOne('File', 'id', 'file_id');
         
    }
   
      public function itinerary()
    {
         
         return $this->hasOne('Itinerary', 'id', 'itinerary_id');
         
    }
    

    







}
